package santiago.server;

/**
 * Enumerates all kind of message that can be displayed on the server's console
 */
public enum ServerMessage {

    CreateGame("game created"),
    JoinedGame("joined the game"),
    LeaveGame("left the game"),
    AboardGame("aboarded"),
    DeletedGame("game deleted"),
    ListGame("list game requested"),
    Connected("connected"),
    Disconnected("disconnected");
    String Message;

    ServerMessage(String Message) {
        this.Message = Message;
    }

    public String get() {
        return Message;
    }

    public void display() {
        System.out.println(Message);
    }

    public void display(String prefix, String suffix) {
        System.out.println((prefix == null ? "" : prefix + " ") + Message + (suffix == null ? "" : " " + suffix));
    }
}
